<template>
  <div class="categories">
    <template v-for="item of categories">
      <div class="item">
        <img :src="item.pictureUrl" alt="">
        <div>{{item.title}}</div>
      </div>
    </template>
  </div>
</template>

<script setup>
import {  } from 'vue'
import useHomeStore from '@/store/modules/home'
import { storeToRefs } from 'pinia';

const homeStore = useHomeStore()
const {categories} = storeToRefs(homeStore)
</script>

<style lang='less' scoped>
.categories{
  display: flex;
  width: 100%;
  overflow-x: auto;
  &::-webkit-scrollbar{
    display: none;
  }
  .item{
    flex-direction: column;
    text-align: center;
    display: flex;
    width: 70px;
    flex-shrink: 0;
    align-items: center;
    text-align: center;
    img{
      width: 30px;
    }
  }
}
</style>